package com.module.antiFake.dao;

import org.hibernate.Session;

import base.dao.GenericHibernateDao;

import com.module.antiFake.vo.AntiFakeOrgConfig;

public class AntiFakeOrgConfigDao extends GenericHibernateDao<AntiFakeOrgConfig,Long>{
	/**
	 * 企业扫码预警设置
	 */
	private static AntiFakeOrgConfigDao dao;
	
	protected AntiFakeOrgConfigDao(){
		
	}
	/**
	 * 单例
	 * @return
	 */
	public synchronized static AntiFakeOrgConfigDao getInstance(){
		if(dao==null){
			dao = new AntiFakeOrgConfigDao();
		}
		return dao;
	}
	/**
	 * 更改
	 */
//	public boolean saveOrUpdateConfig(AntiFakeOrgConfig orgconfig){
//		return dao.saveOrUpdate(orgconfig);
//	}
	
	/**
	 * 查看
	 */
	public AntiFakeOrgConfig findOrgConfig(Session session,String id){
		String hql = "FROM AntiFakeOrgConfig org where org.orgid='"+id+"'";
		AntiFakeOrgConfig antiFakeOrgConfig = dao.findUniqueObjectBySQL(session,hql);
		return antiFakeOrgConfig;
	}
}
